﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tesseract;

namespace CSharpOCR
{
    public class Ocr
    {

        public static TesseractEngine engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.Default);
        public static string OcrImage(Bitmap image)
        {
            using (var page = engine.Process(image, PageSegMode.Auto))
            {
                return page.GetText();
            }
        }
    }
}
